// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import VueRouter from 'vue-router'
import axios from "axios"
import App from './App'
import goods from '@/components/goods/goods'
import ratings from '@/components/ratings/ratings'
import seller from '@/components/seller/seller'

Vue.config.productionTip = false
Vue.prototype.$ajax=axios
Vue.use(VueRouter);
//创建router实例，并定义导航和组件的映射关系
const router = new VueRouter({
  mode: 'history',
  //配置routes
  routes:[
      {
          path:"/",
          component:goods
      },
      {
          path:"/goods",
          component:goods
      },
      {
          path:"/ratings",
          component:ratings
      },
      {
          path:"/seller",
          component:seller
      },
  ]
});
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  template: '<App/>',
  components: { App }
})

//router.push({ path: '/goods' })
